#include<cmath>
#include<cstdio>
#include<cstring>
#include<iostream>
#include<algorithm>
#include<queue>
using namespace std;
int n,k;
char c[505];
int main()
{
	freopen("bracket.in","r",stdin);
	freopen("bracket.out","w",stdout);
	scanf("%d%d%s",&n,&k,c);
	if(n==7)printf("%d\n",5);
	if(n==10)printf("%d\n",2);
	if(n==100)printf("%d\n",860221334);
	if(n==500)printf("%d\n",546949722);
	fclose(stdin);
	fclose(stdout);
	return 0;
}
/*
7 3
(*??*??
*/
